#include "IMNetworkProcessorPrivate.h"
#include "IMNetworkProcessor.h"

IMNetworkProcessorHandlerPrivate::IMNetworkProcessorHandlerPrivate()
    : _pNext(nullptr), _pStart(nullptr)
{
}

void IMNetworkProcessorHandlerPrivate::setNext(const std::string &name)
{
    if (name.empty())
    {
        return;
    }
    _pNext->setName(name);
}

void IMNetworkProcessorHandlerPrivate::setNext(std::shared_ptr<IMNetworkProcessor> next)
{
    _pNext->next(next);
    _pNext = next;
}

std::shared_ptr<IMNetworkProcessor> IMNetworkProcessorHandlerPrivate::getNext() const
{
    return _pNext;
}

std::shared_ptr<IMNetworkProcessor> IMNetworkProcessorHandlerPrivate::getStart() const
{
    return _pStart;
}